/*Maman14.cpp : Defines the entry point for the console application.*/

#include "stdafx.h"
#include "Algorithm.h"

int main(int argc, char*argv[])
{

	while (argc-- >1)
	{
		char *fileName = argv[argc];
		
		if (!strstr(fileName,".as"))
		{
			printf("%s is not a file name",fileName);
			return 0;
		}
		int fileNameLength=strlen(fileName);
		//char filePrefix[fileNameLength-3];
		char* filePrefix=(char*)malloc(fileNameLength-2);
		strncpy(filePrefix,fileName,fileNameLength-3);
		filePrefix[fileNameLength-3]='\0';
		PerformMainAssemblerOperation(filePrefix);
		free(filePrefix);
	}
	return 0;
}

